<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
    <meta name="author" content="">
    <title></title>
    <% include("../inc/input_css.html"){}%>
    <style>
        label{
            width: 140px!important;
        }
    </style>

    <%
    var isAdd = false;
    var isEdit = false;
    if(isEmpty(member.id)){
    isAdd = true;
    }else{
    isEdit = true;
    }%>

</head>

<body>
<div class="ibox">
    <div class="ibox-title">
        <div class="pull-left mbx navbar_title">
            <span class="current">商户管理</span>
            <span class="line">/</span>
            <span class="current"><a href="/sys/business/list">商户列表</a></span><span class="line">/</span>
            <%if(isAdd){%>添加商户<%}else{%>编辑商户<%}%>
        </div>
    </div>
    <div class="ibox-content">
        <div class="wrapper wrapper-content">
            <div class="row">
                <div class="padding-40">
                    <form class="form-horizontal form-validate" method="post" id="form" action="<%if(isAdd){%>/sys/business/save<%}else{%>/sys/business/update<%}%>">
                        <input type="hidden" name="member.id" value="${member.id!}"/>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">品牌方LOGO</label>
                            <div class="col-sm-3">
                                <input type="hidden" name="brandLogo" value="${companyInfo.brandLogo!}" class="pull-left form-control light-input"/>
                                <img class="img-rounded" src="${companyInfo.brandLogo!}" style="max-height:50px;"/>
                                <input type="button" class="button browserButton" value="选择文件" style="line-height: normal"/>
                                <span class="help-block"><span class="maroon"></span>建议300*300像素；格式jpg</span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><span class="maroon"></span>品牌商名称</label>
                            <div class="col-sm-3">
                                <input type="text" name="brandName" value="${companyInfo.brandName!}" class="form-control light-input">
                            </div>

                        </div>
                        <!--<div class="form-group">
                            <label class="col-sm-2 control-label"><span class="maroon"></span>商户排序</label>
                            <div class="col-sm-3">
                                <input placeholder="请输入正整数" maxlength="5"  name="sortNo" value="${companyInfo.sortNo!}" class="form-control light-input" onkeyup="this.value=this.value.replace(/\D/g,'')" onblur="this.value=this.value.replace(/\D/g,'')">
                            </div>
                        </div>-->
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><span class="maroon">*</span>商品分类</label>
                            <div class="col-sm-3">
                                <select name="productCategoryId" class="form-control light-input" style="height: 31px" required>
                                    <option value="">请选择</option>
                                    <%for(list in productFirstCategoryList){%>
                                    <option value="${list.id}" <%if (list.id == companyInfo.productCategoryId!){%> selected<%}%>>${list.name}</option>
                                    <%}%>
                                </select>
                            </div>
                        </div>

                        <!--<div class="form-group">
                            <label class="col-sm-2 control-label"><span class="maroon">*</span>商户登录名</label>
                            <div class="col-sm-3">
                                <%if (isAdd){%>
                                    <input type="text" name="username" value="${member.username!}" class="form-control light-input" required="true">
                                <%}else{%>
                                    <input type="text" name="username" value="${member.username!}" class="form-control light-input" required="true" readonly>
                                <%}%>
                            </div>
                        </div>-->
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><span class="maroon">*</span>登录密码</label>
                            <div class="col-sm-3">
                                <%if(isAdd){%>
                                    <input type="password" name="password" placeholder="不填写默认注册手机号" value="" class="form-control light-input">
                                <%}else{%>
                                    <input type="password" name="password" placeholder="不填写默认原始密码" value="" class="form-control light-input">
                                <%}%>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><span class="maroon">*</span>运营者姓名</label>
                            <div class="col-sm-3">
                                <input type="text" name="personInCharge" value="${companyInfo.personInCharge!}" class="form-control light-input" required="true">
                            </div>

                        </div>

                        <!--
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><span class="maroon">*</span>企业名称</label>
                            <div class="col-sm-3">
                                <input type="text" name="company_name" value="${companyInfo.company_name!}" class="form-control light-input" required="true">
                            </div>

                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><span class="maroon">*</span>营业执照注册号</label>
                            <div class="col-sm-3">
                                <input type="text" name="business_licence_code" value="${companyInfo.business_licence_code!}" class="form-control light-input" required="true">
                            </div>

                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><span class="maroon">*</span>营业执照扫描件</label>
                            <div class="col-sm-3">
                                <input type="hidden" name="business_licence_img" value="${companyInfo.business_licence_img!}" class="pull-left form-control light-input"/>
                                <img class="img-rounded docs-pictures clearfix" data-original="${companyInfo.business_licence_img!}" src="${companyInfo.business_licence_img!}" style="max-height:50px;"/>
                                <input type="button" class="button browserButton" value="选择文件" style="line-height: normal"/>
                            </div>
                        </div>-->

                        <!--<div class="form-group">
                            <label class="col-sm-2 control-label">所属行业</label>
                            <div class="col-sm-10" style="padding-left: 0px">
                                <div class="row">
                                    <div class="col-sm-2">
                                        <select name="category_one" class="form-control" id="category_one" ></select>
                                    </div>
                                    <div class="col-sm-2">
                                        <select name="category_two" class="form-control" id="category_two" ></select>
                                    </div>

                                    <script src="/res/plugins/jiuyue/category_select.js"></script>
                                    <script type="text/javascript">
                                        new category('category_one', 'category_two', '${category_one!}', '${category_two!}');
                                    </script>
                                </div>
                            </div>
                        </div>-->
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><span class="maroon">*</span>手机号码</label>
                            <div class="col-sm-3">
                                <input type="text" name="phone" value="${companyInfo.phone!}" class="form-control light-input" required="true">
                            </div>

                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><span class="maroon">*</span>微信号</label>
                            <div class="col-sm-3">
                                <input type="text" name="weChat" value="${companyInfo.weChat!}" class="form-control light-input" required="true">
                            </div>

                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><span class="maroon"></span>QQ号</label>
                            <div class="col-sm-3">
                                <input type="text" name="qq" value="${companyInfo.qq!}" class="form-control light-input">
                            </div>

                        </div>
                        <!--<div class="form-group">
                            <label class="col-sm-2 control-label"><span class="maroon">*</span>邮箱</label>
                            <div class="col-sm-3">
                                <input type="text" name="email" value="${companyInfo.email!}" class="form-control light-input" required="true">
                            </div>

                        </div>-->

                        <div class="form-group" style="margin-top: 24px">
                            <label class="col-sm-2 control-label "></label>
                            <div class="col-sm-4 col-sm-offset-0">
                                <button class="hive-btn-cancle" id="btn_cancle" type="button" onclick="history.back()">&nbsp;取消&nbsp;</button>
                                <button class="hive-btn hive-btn-primary margin-left-8" type="submit">&nbsp;提交&nbsp;
                                </button>
                            </div>
                        </div>

                    </form>


                </div>
            </div>
        </div>
    </div>
</div>

<% include("../inc/input_js.html"){}%>
<!-- 自定义js -->
<script type="text/javascript">
    var uploadUrl="/file/uploadfile?shopId=plateform&type=d";
    var browserUrl="/file/browser?shopId=plateform";
</script>
<script src="https://static.9hive.cn/global/vendor/file/file.js"></script>
<script type="text/javascript">
    $(function () {
        $("input.browserButton").browser();
        $('.i-checks').iCheck({
            checkboxClass: 'icheckbox_flat-blue',
            radioClass: 'iradio_flat-blue',
        });

    })
</script>
</body>
</html>